import request from '@/utils/request'

// 获取采集器信息
export function getInfo() {
  return request({
    url: '/apartment/collect',
    method: 'get',
  })
}

export function getList(data) {
  return request({
    url: '/apartment/collect/list',
    method: 'get',
    params: data
  })
}

// 添加采集器
export function add(data) {
  return request({
    url: '/apartment/collect',
    method: 'post',
    data: data
  })
}

// 编辑
export function edit(data) {
  return request({
    url: '/apartment/collect',
    method: 'put',
    data: data
  })
}

export function getSelect(data) {
  return request({
    url: '/apartment/collect/select',
    method: 'get',
    params: data
  })
}

export function remove(meterId) {
  return request({
    url: `/apartment/collect/${meterId}`,
    method: 'delete'
  })
}

export default {
  getInfo,
  add,
  getList,
  remove,
  getSelect
}